package com.songminju.jsong_mvc;

import com.songminju.jsong_httpserver.HttpServerConfig;
import com.songminju.jsong_httpserver.httpServer;
import com.songminju.jsong_httpserver.server.bio.BIOHttpServer;
import com.songminju.jsong_httpserver.server.bio.HtttpHandlerTask;
import com.songminju.jsong_mvc.controller.HttpHandler;
import com.songminju.jsong_mvc.ioc.IOCManager;

public class JSongMVC {
	
	private HttpServerConfig httpServerConfig = null;
	private httpServer httpServer = null;
	private HttpHandler httpHandler = null;
	private IOCManager iocManager = null;
	
	private static class SingleHolder{
		static JSongMVC single = new JSongMVC();
	}
	public static JSongMVC single() {
		return SingleHolder.single;
	}
	
	private JSongMVC() {
		iocManager = new IOCManager();
		httpHandler = new HttpHandler();
		iocManager.loadFiltersAndControllers("com.songminju",httpHandler);
		httpServerConfig = new HttpServerConfig();
		httpServerConfig.setHander(httpHandler);
		httpServer = new BIOHttpServer(httpServerConfig);
	}
	
	
	public void service() {
		
	}
	
}
